<?php

use think\facade\Route;

// 统计
Route::rule('count', 'count/index', 'GET')->allowCrossDomain();
// 模板消息
Route::rule('getTemplate', 'template/get', 'GET')->allowCrossDomain();
Route::rule('modifyTemplate', 'template/modify', 'PUT')->allowCrossDomain();
Route::rule('sendTemplate', 'template/send', 'POST')->allowCrossDomain();

// 社区
Route::rule('system', 'system/index', 'GET')->allowCrossDomain();
Route::rule('addSystem', 'system/add', 'POST')->allowCrossDomain();
Route::rule('getSystem', 'system/get', 'GET')->allowCrossDomain();
Route::rule('modifySystem', 'system/modifySystem', 'PUT')->allowCrossDomain();
Route::rule('modifyWechat', 'system/modifyWechat', 'PUT')->allowCrossDomain();

// 管理
Route::rule('login', 'manager/login', 'POST')->allowCrossDomain();
Route::rule('teacherLogin', 'manager/teacherLogin', 'POST')->allowCrossDomain();
Route::rule('logout', 'manager/logout', 'POST')->allowCrossDomain();
Route::rule('captcha', 'manager/captcha', 'GET')->allowCrossDomain();
// --
Route::rule('manager', 'manager/index', 'GET')->allowCrossDomain();
Route::rule('addManager', 'manager/add', 'POST')->allowCrossDomain();
Route::rule('getManager', 'manager/get', 'GET')->allowCrossDomain();
Route::rule('modifyManager', 'manager/modify', 'PUT')->allowCrossDomain();
Route::rule('switchManager', 'manager/switch', 'PUT')->allowCrossDomain();
Route::rule('deleteManager', 'manager/delete', 'DELETE')->allowCrossDomain();

// 用户
Route::rule('user', 'user/index', 'GET')->allowCrossDomain();
Route::rule('searchUser', 'user/search', 'GET')->allowCrossDomain();
Route::rule('getPassword', 'user/getpwd', 'POST')->allowCrossDomain();
Route::rule('updatePassword', 'user/uppwd', 'POST')->allowCrossDomain();

// 指南分类
Route::rule('guideType', 'guideType/index', 'GET')->allowCrossDomain();
Route::rule('addGuideType', 'guideType/add', 'POST')->allowCrossDomain();
Route::rule('getGuideType', 'guideType/get', 'GET')->allowCrossDomain();
Route::rule('modifyGuideType', 'guideType/modify', 'PUT')->allowCrossDomain();
Route::rule('switchGuideType', 'guideType/switch', 'PUT')->allowCrossDomain();
Route::rule('selectGuideType', 'guideType/select', 'GET')->allowCrossDomain();
Route::rule('deleteGuideType', 'guideType/delete', 'DELETE')->allowCrossDomain();

// 办事指南
Route::rule('guide', 'guide/index', 'GET')->allowCrossDomain();
Route::rule('addGuide', 'guide/add', 'POST')->allowCrossDomain();
Route::rule('getGuide', 'guide/get', 'GET')->allowCrossDomain();
Route::rule('modifyGuide', 'guide/modify', 'PUT')->allowCrossDomain();
Route::rule('switchGuide', 'guide/switch', 'PUT')->allowCrossDomain();
Route::rule('deleteGuide', 'guide/delete', 'DELETE')->allowCrossDomain();
Route::rule('deleteAllGuide', 'guide/deleteAll', 'DELETE')->allowCrossDomain();

// 导航
Route::rule('nav', 'nav/index', 'GET')->allowCrossDomain();
Route::rule('addNav', 'nav/add', 'POST')->allowCrossDomain();
Route::rule('getNav', 'nav/get', 'GET')->allowCrossDomain();
Route::rule('modifyNav', 'nav/modify', 'PUT')->allowCrossDomain();
Route::rule('switchNav', 'nav/switch', 'PUT')->allowCrossDomain();
Route::rule('deleteNav', 'nav/delete', 'DELETE')->allowCrossDomain();

// 网格
Route::rule('grid', 'grid/index', 'GET')->allowCrossDomain();
Route::rule('addGrid', 'grid/add', 'POST')->allowCrossDomain();
Route::rule('getGrid', 'grid/get', 'GET')->allowCrossDomain();
Route::rule('modifyGrid', 'grid/modify', 'PUT')->allowCrossDomain();
Route::rule('switchGrid', 'grid/switch', 'PUT')->allowCrossDomain();
Route::rule('deleteGrid', 'grid/delete', 'DELETE')->allowCrossDomain();

// 两委分工
Route::rule('office', 'office/index', 'GET')->allowCrossDomain();
Route::rule('addOffice', 'office/add', 'POST')->allowCrossDomain();
Route::rule('getOffice', 'office/get', 'GET')->allowCrossDomain();
Route::rule('modifyOffice', 'office/modify', 'PUT')->allowCrossDomain();
Route::rule('switchOffice', 'office/switch', 'PUT')->allowCrossDomain();
Route::rule('deleteOffice', 'office/delete', 'DELETE')->allowCrossDomain();

// 咨询分类
Route::rule('seekType', 'seekType/index', 'GET')->allowCrossDomain();
Route::rule('addSeekType', 'seekType/add', 'POST')->allowCrossDomain();
Route::rule('getSeekType', 'seekType/get', 'GET')->allowCrossDomain();
Route::rule('modifySeekType', 'seekType/modify', 'PUT')->allowCrossDomain();
Route::rule('switchSeekType', 'seekType/switch', 'PUT')->allowCrossDomain();
Route::rule('selectSeekType', 'seekType/select', 'GET')->allowCrossDomain();
Route::rule('deleteSeekType', 'seekType/delete', 'DELETE')->allowCrossDomain();

// 党建分类
Route::rule('partyType', 'partyType/index', 'GET')->allowCrossDomain();
Route::rule('addPartyType', 'partyType/add', 'POST')->allowCrossDomain();
Route::rule('getPartyType', 'partyType/get', 'GET')->allowCrossDomain();
Route::rule('modifyPartyType', 'partyType/modify', 'PUT')->allowCrossDomain();
Route::rule('switchPartyType', 'partyType/switch', 'PUT')->allowCrossDomain();
Route::rule('selectPartyType', 'partyType/select', 'GET')->allowCrossDomain();
Route::rule('deletePartyType', 'partyType/delete', 'DELETE')->allowCrossDomain();

// 党建信息
Route::rule('party', 'party/index', 'GET')->allowCrossDomain();
Route::rule('addParty', 'party/add', 'POST')->allowCrossDomain();
Route::rule('getParty', 'party/get', 'GET')->allowCrossDomain();
Route::rule('modifyParty', 'party/modify', 'PUT')->allowCrossDomain();
Route::rule('deleteParty', 'party/delete', 'DELETE')->allowCrossDomain();

// 社区动态
Route::rule('active', 'active/index', 'GET')->allowCrossDomain();
Route::rule('addActive', 'active/add', 'POST')->allowCrossDomain();
Route::rule('getActive', 'active/get', 'GET')->allowCrossDomain();
Route::rule('modifyActive', 'active/modify', 'PUT')->allowCrossDomain();
Route::rule('deleteActive', 'active/delete', 'DELETE')->allowCrossDomain();

// 轮播图
Route::rule('getBanner', 'banner/get', 'GET')->allowCrossDomain();
Route::rule('modifyBanner', 'banner/modify', 'POST')->allowCrossDomain();

// 建议
Route::rule('suggest', 'suggest/index', 'GET')->allowCrossDomain();
Route::rule('deleteSuggest', 'suggest/delete', 'DELETE')->allowCrossDomain();
Route::rule('deleteAllSuggest', 'suggest/deleteAll', 'DELETE')->allowCrossDomain();

// 预约
Route::rule('book', 'book/index', 'GET')->allowCrossDomain();
Route::rule('deleteBook', 'book/delete', 'DELETE')->allowCrossDomain();
Route::rule('deleteAllBook', 'book/deleteAll', 'DELETE')->allowCrossDomain();

// 咨询
Route::rule('seek', 'seek/index', 'GET')->allowCrossDomain();
Route::rule('deleteSeek', 'seek/delete', 'DELETE')->allowCrossDomain();
Route::rule('deleteAllSeek', 'seek/deleteAll', 'DELETE')->allowCrossDomain();

// 房屋租赁
Route::rule('tenancy', 'tenancy/index', 'GET')->allowCrossDomain();
Route::rule('addTenancy', 'tenancy/add', 'POST')->allowCrossDomain();
Route::rule('getTenancy', 'tenancy/get', 'GET')->allowCrossDomain();
Route::rule('modifyTenancy', 'tenancy/modify', 'PUT')->allowCrossDomain();
Route::rule('switchTenancy', 'tenancy/switch', 'PUT')->allowCrossDomain();
Route::rule('deleteTenancy', 'tenancy/delete', 'DELETE')->allowCrossDomain();

// API
Route::rule('uploadFile', 'upload/file', 'POST')->allowCrossDomain();
Route::rule('uploadImage', 'upload/image', 'POST')->allowCrossDomain();
Route::post('notice/:name', 'Notice/:name')->allowCrossDomain();
Route::post('order/:name', 'Order/:name')->allowCrossDomain();
Route::POST('/teacher/:name', 'teacher/:name')->allowCrossDomain();

Route::rule('user/:name', 'User/:name', 'POST')->allowCrossDomain();